package main

import (
	"os"
	"os/signal"
	"syscall"
)

func main() {

	sigs := make(chan os.Signal)
	signal.Notify(sigs, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGINT, syscall.SIGTERM)
	devServ := &deviceServer{id: "devServ01"}
	cmdServ := &cmdServer{id: "cmdServ01", devServ: devServ}
	devServ.start(":9978")
	cmdServ.start(":9979")
	<-sigs
	devServ.stop()
	cmdServ.stop()
}
